<div ng-controller="UploadController">
    <!--<bwc-card show-header="true">
    <header>
        点击上传
    </header>
    <bwc-row>
        <bwc-col span="12">
            <bwc-upload class="upload-demo" action="http://api.admin.earth.dev.bwcmall.cn/api/v1/brand/upload?token=8b2b131c9a840de8ee08e24772e24b87" on-preview="handlePreview" on-remove="handleRemove" file-list="fileList">
                <bwc-button size="small" type="primary">点击上传</bwc-button>
                <tip>
                    <div class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div>
                </tip>
            </bwc-upload>
        </bwc-col>
    </bwc-row>
</bwc-card>-->
    <bwc-card show-header="true">
        <header>
            用户头像上传
        </header>
        <bwc-row>
            <bwc-col span="12">
                <bwc-upload class="avatar-uploader" action="http://api.admin.earth.dev.bwcmall.cn/api/v1/brand/upload?token=8b2b131c9a840de8ee08e24772e24b87" file-list="fileList" on-success="handleAvatarSuccess">
                    <img ng-if="imageUrl" ng-src="{{imageUrl}}" class="avatar">
                    <i ng-if="!imageUrl" class="el-icon-plus avatar-uploader-icon"></i>
                </bwc-upload>
            </bwc-col>
        </bwc-row>
    </bwc-card>
    <bwc-card show-header="true">
        <header>
            照片墙
        </header>
        <bwc-row>
            <bwc-col span="24">
                <bwc-upload action="http://api.admin.earth.dev.bwcmall.cn/api/v1/brand/upload?token=8b2b131c9a840de8ee08e24772e24b87" list-type="picture-card" on-preview="handlePictureCardPreview" on-remove="handleRemove" file-list="fileList" on-success="handleSuccess">
                    <i class="el-icon-plus"></i>
                </bwc-upload>
            </bwc-col>
        </bwc-row>
    </bwc-card>
    <!--<bwc-card show-header="true">
    <header>
        图片列表缩略图
    </header>
    <bwc-row>
        <bwc-col span="24">
            <bwc-upload class="upload-demo" action="http://api.admin.earth.dev.bwcmall.cn/api/v1/brand/upload?token=8b2b131c9a840de8ee08e24772e24b87" on-preview="handlePreview" on-remove="handleRemove" file-list="fileList" list-type="picture">
                <bwc-button size="small" type="primary">点击上传</bwc-button>
                <tip>
                    <div class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div>
                </tip>
            </bwc-upload>
        </bwc-col>
    </bwc-row>
</bwc-card>
<bwc-card show-header="true">
    <header>
        上传文件列表控制
    </header>
    <bwc-row>
        <bwc-col span="24">
            <bwc-upload class="upload-demo" action="http://api.admin.earth.dev.bwcmall.cn/api/v1/brand/upload?token=8b2b131c9a840de8ee08e24772e24b87" on-change="handleChange" file-list="fileList">
                <bwc-button size="small" type="primary">点击上传</bwc-button>
                <tip>
                    <div class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div>
                </tip>
            </bwc-upload>
        </bwc-col>
    </bwc-row>
</bwc-card>
<bwc-card show-header="true">
    <header>
        拖拽上传
    </header>
    <bwc-row>
        <bwc-col span="24">
            <bwc-upload class="upload-demo" drag="true" action="http://api.admin.earth.dev.bwcmall.cn/api/v1/brand/upload?token=8b2b131c9a840de8ee08e24772e24b87" multiple="true">
                <i class="el-icon-upload"></i>
                <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
                <tip>
                    <div class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div>
                </tip>
            </bwc-upload>
        </bwc-col>
    </bwc-row>
</bwc-card>
<bwc-card show-header="true">
    <header>
        手动上传
    </header>
    <bwc-row>
        <bwc-col span="24">
            <bwc-upload class="upload-demo" ref="upload" action="http://api.admin.earth.dev.bwcmall.cn/api/v1/brand/upload?token=8b2b131c9a840de8ee08e24772e24b87" on-preview="handlePreview" on-remove="handleRemove" file-list="fileList" auto-upload="false">
                <bwc-button slot="trigger" size="small" type="primary">选取文件</bwc-button>
                <bwc-button style="margin-left: 10px;" size="small" type="success" ng-click="submitUpload">上传到服务器</bwc-button>
                <tip>
                    <div class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div>
                </tip>
            </bwc-upload>
        </bwc-col>
    </bwc-row>
</bwc-card>-->
</div>
<style>
    .avatar-uploader .el-upload {
        border: 1px dashed #d9d9d9;
        border-radius: 6px;
        cursor: pointer;
        position: relative;
        overflow: hidden;
    }
    
    .avatar-uploader .el-upload:hover {
        border-color: #20a0ff;
    }
    
    .avatar-uploader-icon {
        font-size: 28px;
        color: #8c939d;
        width: 178px;
        height: 178px;
        line-height: 178px;
        text-align: center;
    }
    
    .avatar {
        width: 178px;
        height: 178px;
        display: block;
    }
</style>